package bn;

import main.Main;
import env.City;

public class ChemNode
{
	public City				city;
	public double			p;
	public ChemReportedNode	son;

	public ChemNode(City city)
	{
		this.city = city;
		son = new ChemReportedNode(city, this);
		p = Main.pChem;
	}

	public void addTerroristNode(TerroristNode newSon)
	{
		son.addTerroristNode(newSon);
	}

	public double notChem()
	{
		return 1 - p;
	}

	public String output()
	{
		String ans = new String();
		ans += "VERTEX " + city.getName() + ": chem\n" + "  p(chem) = " + p + "\n"
				+ "  p(not chem) = " + notChem() + "\n";
		return ans;
	}

}
